package com.cxc.mp.simple.pojo;

import com.baomidou.mybatisplus.annotation.*;

import com.baomidou.mybatisplus.extension.activerecord.Model;
import com.cxc.mp.simple.enums.SexEnum;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;

@Data
@AllArgsConstructor
@NoArgsConstructor
//@TableName("tb_user")
public class User  extends Model<User> {

    @TableId(type = IdType.AUTO) //指定id类型为自增长
    private Long id;
    private String userName;
    @TableField(fill = FieldFill.INSERT)//
    private String password;
    private String name;
    private Integer age;
    @TableField(value = "email")// 解决字段名称不一致
    private String mail;
    @TableField(exist = false)//该字段在数据库中不存在
    private String address;

    @TableLogic
    private Integer deleted;//是否删除 逻辑删除

    private SexEnum sex;

    @Version
    private Integer version;

}
